/*
 * @Author: qiulin 1746365080@qq.com
 * @Date: 2024-11-03 22:25:10
 * @LastEditors: qiulin_JXGM ql1746365080@gmail.com
 * @LastEditTime: 2024-12-06 16:40:59
 * @FilePath: /SGSim/DataStructure/Input/Material/ThermalMaterial.h
 */

#pragma once
#include "Utility/Algebra/Matrix.h"

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Material/MaterialBase.h"

#include "MaterialTypes.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct ThermalMaterial : public MaterialBase
{
    /// @brief 构造函数，创建温度相关材料
    /// @param id 材料属性号，默认0
    SG::DataStructure::Common::Real m_K         = 0.0;  ///< 热导率
    SG::DataStructure::Common::Real m_CP        = 0.0;  ///< 比热容
    SG::DataStructure::Common::Real m_RHO       = 1.0;  ///< 密度
    SG::DataStructure::Common::Real m_H         = 0.0;  ///< 自由对流换热系数
    SG::DataStructure::Common::Real m_MU        = 0.0;  ///< 动力粘度
    SG::DataStructure::Common::Real m_HGEN      = 1.0;  ///< 用于QVOL条目的热生成能力
    SG::DataStructure::Common::Real m_REFENTH   = 0.0;  ///< 参考焓
    SG::DataStructure::Common::Real m_TCH       = 0.0;  ///< 相变区域发生的最低温度限制
    SG::DataStructure::Common::Real m_TDELTA    = 0.0;  ///< 相变发生的总温度变化范围
    SG::DataStructure::Common::Real m_QLAT      = 0.0;  ///< 相变相关的单位质量的潜热
    SG::DataStructure::Common::I64  m_DOMAIN_ID = 0;    ///< 域ID
    static MaterialTypes            GetType ()
    {
        return MaterialTypes::MATTYPE_THERMAL;
    };
};

DECLSPEC bool operator== (const ThermalMaterial& val1, const ThermalMaterial& val2);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE